1. Field of the Invention
The present invention relates to a data processing apparatus able to suitably determine quantization scales and a method and an encoding device of the same.
2. Description of the Art
In recent years, apparatuses have been developed based on the standards of the MPEG (Moving Picture Experts Group), JVT (Joint Video Team), etc. handling image data and, at that time, aiming at higher efficiency transmission and storage of information by utilizing the redundancy peculiar to image data in order to compress the data by a discrete cosine transform or other orthogonal transform and motion compensation. In the encoding device of such standards, high efficiency encoding is realized by utilizing local information of the image. In an image, by nature, even if complex parts in the image are encoded with a rougher quantization than that for other parts, deterioration of the image quality is hard to see by the naked eye.
Accordingly, an encoding device of the art divides an image into a plurality of parts, detects the degree of complexity of the image for each part, and, based on the results of detection, roughly quantizes the complex parts of the image and finely quantizes the parts which are not complex so as to reduce the amount of data while suppressing the effect of deterioration of image quality. Such information of the degree of complexity of an image is referred to as activity. An encoding device of the art calculates the activity of the image data to be quantized and generates quantization scales prescribing the quantization scale for each picture based on the activity. Namely, the encoding device determines the amount of bits allocated to a picture for each picture. The encoded data generated by the encoding device is stored in a buffer coded picture buffer (CPB) in a decoding device, then pictures composing the encoded data are sequentially supplied to a decoding unit at a predetermined picture rate to be decoded. Here, the amount by which the amount of storage of data of the buffer CPB is decreased due to one picture being supplied from the buffer CPB to the decoding unit depends upon the amount of data of the picture, that is, the quantization parameter of the picture. Accordingly, the encoding device must determine the quantization scales so as not to cause overflow or underflow of the buffer CPB of the decoding device.
An encoding device of the related art, however, determines the quantization scale of each picture based on only the activity of the image data to be quantized, therefore the amounts of data of the pictures finally encoded cannot be controlled so as to suitably maintain the state of the buffer CPB in some cases and there is therefore the problem that the quality of the decoded image being low.